<template>
    <!--搜索栏-->
    <van-search v-model="searchdata"  input-align="center" placeholder="请输入搜索内容" >
        <!-- <template #action>
           <i class="el-icon-s-home" @click="clickHome"></i>
        </template> -->
    </van-search>
</template>

<script>
export default {
    data() {
        return {
            searchdata: ''
        };
    },
    methods: {
        onSearch() {
			localStorage.setItem('searchdata',this.searchdata);
            //console.log(this.searchdata);
            this.$router.push({
                name: 'searchlist',
                params: {
                    searchdata:this.searchdata
                }
            });
            setTimeout(()=>{
                this.$router.replace({name:'frontrefresh'});
            },200);
        },
        clickHome(){
            this.$router.push({
                name:'shopindex'
            });
        }
    },
    created() {}
};
</script>

<style lang="scss">
</style>